//
//  LunbotuDetailTableViewCell.m
//  BeautyClother
//
//  Created by dllo on 15/8/28.
//  Copyright (c) 2015年 宋爽. All rights reserved.
//

#import "LunbotuDetailTableViewCell.h"

@interface LunbotuDetailTableViewCell ()

@property (nonatomic, assign) CGFloat offWidth;
@property (nonatomic, assign) CGFloat offHeight;

@end

@implementation LunbotuDetailTableViewCell

- (void)dealloc
{
    [_image release];
    [_text release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
            self.text = [[UILabel alloc]init];
            [self.contentView addSubview:_text];
            [_text release];
        
       
            self.image = [[UIImageView alloc]init];
            [self.contentView addSubview:self.image];
            [_image release];
        
        self.offWidth = [[UIScreen mainScreen]bounds].size.width / 375;
        self.offHeight = [[UIScreen mainScreen]bounds].size.height / 667;
    
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.image.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.width * _height / _width);
    
    self.text.frame = CGRectMake(0, 0, self.frame.size.width, 200*_offHeight);
    self.text.numberOfLines = 0;
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
